// ex8_8_3.cpp
#include <cctype>
#include <iostream>
#include <cstring>
using namespace std;
string my_upper(string &str);

int main(void)
{
    //string ch = "hello";
    //cout << ch << "\n";
    //ch = my_upper(ch);
    //cout << ch << "\n";
    string ch;
    cout << "Ener a string (q to quit): ";
    while (getline(cin, ch))
    {
        if ((ch.length() == 1) && (ch[0] == 'q'))
            break;
        ch = my_upper(ch);
        cout << ch << "\n";
        cout << "Next string (q to quit): ";
    }
    return 0;
}

string my_upper(string &str)
{
    //str.c_str();
    
    for (int i = 0; i < str.length(); i++)
    {
        str[i]= toupper(str.at(i));
    }
    return str;
}